package cn.shutdown.demo.thread.interrupt.use_return;

/**
 * @author jiangwujie
 * @date 2021/8/9
 */
public class Mythread extends Thread {

    @Override
    public void run() {
        while (true) {
            if (this.isInterrupted()) {
                System.out.println("interrupted and return");
                return;
            }
            System.out.println("running");
        }
    }
}
